package com.naiterui.ehp.bs.ds.modules.goods.feign;

import java.util.Set;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import com.naiterui.ehp.bp.support.config.FeignConfiguration;
import com.naiterui.ehp.bp.support.exception.BusinessException;
import com.naiterui.ehp.bs.ds.modules.goods.vo.WarehouseGoodsInventoryVO;

@RequestMapping("/inner/cms/warehouse/goods")
@FeignClient(name = "warehouseGoods", url = "${ehp.domain.b2c}", configuration = FeignConfiguration.class)
public interface WarehouseGoodsFeignClient {

    /**
     * 修改库存
     */
    @PostMapping("/inventory/{warehouseId}")
    void updateInventory(@PathVariable("warehouseId") Long warehouseId,
                         @RequestBody Set<WarehouseGoodsInventoryVO> warehouseGoodsInventorys) throws BusinessException;

}
